package com.icinfo.cloud.provider.punish.common.publicsecurityentrust.model;

import lombok.Data;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * 公安委托街道号段
 */
@Data
@Accessors(chain = true)
@Table(name = "upcase.case_public_security_entrust_document_number_segment")
public class CasePublicSecurityEntrustDocumentNumberSegment implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @Id
    @Column(name = "id")
    private String id;

    /**
     * 大号段id（case_public_security_document_number.id）
     */
    @Column(name = "document_number_id", nullable = false)
    private String documentNumberId;

    /**
     * 委托部门区划编码
     */
    @Column(name = "entrust_area_code")
    private String entrustAreaCode;

    /**
     * 委托机构编码
     */
    @Column(name = "entrust_org_code", nullable = false)
    private String entrustOrgCode;

    /**
     * 被委托机构编码
     */
    @Column(name = "org_code", nullable = false)
    private String orgCode;

    /**
     * 号段开始数
     */
    @Column(name = "number_start")
    private String numberStart;

    /**
     * 号段结束数
     */
    @Column(name = "number_end")
    private String numberEnd;

    /**
     * 号段数=号段截止-号段开始+1
     */
    @Column(name = "number_segment")
    private Integer numberSegment;

    /**
     * 已使用数量
     */
    @Column(name = "used_number_count")
    private Integer usedNumberCount;

    /**
     * 当前使用到的号段数
     */
    @Column(name = "current_number")
    private String currentNumber;

    /**
     * 是否删除 0否  1是
     */
    @Column(name = "is_deleted")
    private String isDeleted;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 创建人id
     */
    @Column(name = "create_user_id")
    private String createUserId;

    /**
     * 创建人
     */
    @Column(name = "create_user")
    private String createUser;

    /**
     * 更新时间
     */
    @Column(name = "update_time")
    private Date updateTime;

    /**
     * 更新人
     */
    @Column(name = "update_user")
    private String updateUser;

    /**
     * 更新人id
     */
    @Column(name = "update_user_id")
    private String updateUserId;

    /**
     * 最近一次报警时间
     */
    @Column(name = "alarm_time")
    private Date alarmTime;

}
